"""
生产环境的配置文件

@File: prod.py
"""
from pydantic import BaseSettings
from urllib import parse


class AppConfig(BaseSettings):
    """app启动的相关配置"""
    MODE: str = 'prod'
    HOST: str = '0.0.0.0'
    PORT: int = 8555


class MongoConfig(BaseSettings):
    """mongo 启动的相关配置"""
    HOST: str = '121.37.152.140'
    PORT: int = 8635
    USERNAME: str = 'rwuser'
    PASSWORD: str = 'dfLUL48m@+3J'
    DATABASE: str = 'df-perception'


class MySQLConfig(BaseSettings):
    """mysql 启动的相关配置"""
    HOST: str = '122.9.94.112'
    PORT: int = 3306
    USERNAME: str = 'hgd_reader'
    PASSWORD: str = parse.quote_plus('dfcx@2022')
    DATABASE: str = 'och_prd'


class OauthConfig(BaseSettings):
    """用户认证的相关配置"""
    SECRET_KEY: str = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
    ALGORITHM: str = "HS256"
    ACCESS_TOKEN_EXPIRE_DAYS: int = 30


app_conf = AppConfig()
mongo_conf = MongoConfig()
mysql_conf = MySQLConfig()
oauth_conf = OauthConfig()